package com.dinstar.pjsip.event;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

public class CallComingEvent implements Parcelable {
    private String callee;
    private String caller;
    private String displayName;

    public CallComingEvent(Parcel in) {
        this.callee = in.readString();
        this.caller = in.readString();
        this.displayName = in.readString();
    }

    public CallComingEvent(String callee, String caller, String displayName) {
        this.callee = callee;
        this.caller = caller;
        this.displayName = displayName;
    }

    public static final Creator<CallComingEvent> CREATOR = new Creator<CallComingEvent>() {
        @Override
        public CallComingEvent createFromParcel(Parcel in) {
            return new CallComingEvent(in);
        }

        @Override
        public CallComingEvent[] newArray(int size) {
            return new CallComingEvent[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel parcel, int i) {
        parcel.writeString(this.callee);
        parcel.writeString(this.caller);
        parcel.writeString(this.displayName);
    }
}
